﻿namespace Digitalmes.Domain.Mes;

/// <summary>
/// 产品返工模板
/// </summary>
[SugarTable("rework_template", "产品返工模板")]
public class ReworkTemplate : EntityBase
{
    /// <summary>
    /// 模板名称
    /// </summary>
    public string? TemplateName { get; set; }

    /// <summary>
    /// 工艺类型编号
    /// </summary>
    [NotNull]
    public string? ProcTypeCode { get; set; }

    /// <summary>
    /// 工艺类型名称
    /// </summary>
    [NotNull]
    public string? ProcTypeName { get; set; }

    /// <summary>
    /// 在工艺类型匹配时，是否为默认选择该模板。
    /// </summary>
    public bool IsDefault { get; set; }

    /// <summary>
    /// 明细项集合
    /// </summary>
    [Navigate(NavigateType.OneToMany, nameof(ReworkTemplateSubject.TemplateId))]
    public List<ReworkTemplateSubject>? Subjects { get; set; }
}
